package com.thingsgrid.mqtthelper.config;

import org.springframework.integration.annotation.MessagingGateway;
import org.springframework.integration.mqtt.support.MqttHeaders;
import org.springframework.messaging.handler.annotation.Header;

/**
 * 功能说明：调用MQTT生产者
 *
 * @author 李龙飞
 * @since 2019/8/26 14:51
 */

@MessagingGateway(defaultRequestChannel = "mqttOutboundChannel")
public interface MqttGateway {

    /**
     *说明：发送MQTT消息
     *@author lilongfei
     *@since 2019/8/26 14:52
     */
    void sendToMqtt(String data, @Header(MqttHeaders.TOPIC) String topic);

}
